#include "sortdialog.h"
#include "ui_sortdialog.h"
#include <QtGui>

sortDialog::sortDialog(QWidget *parent) :
    QDialog(parent)
   // ui(new Ui::sortDialog)
{
    //ui->
    setupUi(this);

    SecondaryGroupBox->hide();
    TertiaryGroupBox->hide();
    layout()->setSizeConstraint(QLayout::SetFixedSize);

    setColumnRange('A', 'Z');

}

void sortDialog::setColumnRange(QChar first, QChar last)
{
    PrimaryColumnCombo->clear();
    SecondaryColumnCombo->clear();
    TertiaryColumnCombo->clear();

    SecondaryColumnCombo->addItem(tr("None"));
    TertiaryColumnCombo->addItem(tr("None"));
            PrimaryColumnCombo->setMinimumSize(SecondaryColumnCombo->sizeHint());

    QChar ch = first;
    while(ch <= last)
    {
        PrimaryColumnCombo->addItem(QString(ch));
        SecondaryColumnCombo->addItem(QString(ch));
        TertiaryColumnCombo->addItem(QString(ch));
        ch = ch.unicode() + 1;
    }
}

//sortDialog::~sortDialog()
//{
//    delete ui;
//}
